#live2d-canvas{
    background:transparent;
    display: flex;
    height: 100dvh;
    width: 100dvw;
    z-index: 4;
    position: fixed;
    top: 0;
    padding: 0;
    margin: 0;
}

#bg_custom {
    z-index: 1;
}


#bg1 {
    z-index: 0;
}

#visual-novel-wrapper {
    z-index: 2;
}

#expression-wrapper {
    z-index: 3;
}

#live2d_reload_button {
    margin-left: 0.2em;
    margin-right: 0.2em;
    padding: 0.35em;
}

.live2d-character-select-div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 1em;
}

#live2d_character_select {
    margin-bottom: 0;
    margin-left: 1em;
    margin-right: 1em;
}

.live2d-parameter {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.live2d-parameter-title {
    width: 40%;
    box-sizing: border-box;
    padding: 1em;
    margin: 0;
    margin-right: 0px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

.live2d-model-select-div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 1em;
}

#live2d_model_div {
    display: none;
}

#live2d_model_select {
    margin-bottom: 0;
    margin-left: 1em;
    margin-right: 1em;
}

#live2d_model_settings {
    display: none;
}

.live2d-select-div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.live2d-select-div select {
    margin: 0;
    margin-right: 1em;
}

.live2d-select-div i {
    padding: 0.2em;
}

.live2d-select-div .menu_button {
    margin-right: 0.2em;
}

.live2d-hidden {
    visibility: hidden;
}

/* Style of Dlg */
.live2d-dialog {
    display: block;
    position: absolute;
    z-index: 3001;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.live2d-dialog-content {
    margin: 5% 5% 5% 55%;
    border: 1px solid #888;
    width: 40vw;
    height: 80vh;
    background-color: var(--SmartThemeBlurTintColor);
    color: var(--SmartThemeBodyColor);
    border-radius: 10px;
    padding: 5px;
    border: 1px solid var(--SmartThemeBorderColor);
    box-shadow: 0 0 20px black;
    backdrop-filter: blur(calc(var(--SmartThemeBlurStrength)));
    -webkit-backdrop-filter: blur(calc(var(--SmartThemeBlurStrength)));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.live2D-dialog-header{
    width: 100%;
    height: fit-content;
    flex-shrink: 0;
}

.live2D-dialog-btn-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.live2D-dialog-btn-close:hover,
.live2D-dialog-btn-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Style the gallery */
.live2D-filter{
    display: flex;
    flex-wrap: wrap;
    height: fit-content;
    flex-shrink: 0;
}

.live2D-filter-box{
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    height: fit-content;
    flex-shrink: 0;
    margin-left: 1vw;
}

.live2D-filter-label{
    font-size: small;
    padding: 0;
    margin: 0;
}

.live2d-filter-input{
    margin-top: 0;
    padding-top: 0;
    width: 200px;
}

.live2D-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    flex-grow: 1;
    height: 70vh;
    overflow-y: auto;
    margin: -5px; /* Negative margin for spacing */
}

.img-container {
    position: relative;
    overflow: hidden;
    border: 2px solid #fff; /* White border around images */
    margin: 5px; /* Spacing between images */
    width: calc(33.333% - 10px); /* five columns with 5px margin on each side */
    cursor: pointer; /* Add cursor pointer for clickability */
  }

.img-container img {
    transition: transform 0.3s ease-in-out, width 0.3s ease-in-out, height 0.3s ease-in-out; /* Transition width and height change */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Adding a small shadow */
    width: 100%;
    height: auto;
}

.img-container:hover img {
    transform: scale(1.2);
    width: 100%; /* Enlarge image on hover */
    height: auto;
    z-index: 1; /* Ensure the image is on top */
}

.live2D-footer{
    width: 100%;
    height: 30px;
    padding: 5px;
    flex-shrink: 0;
}

